import 'package:flutter/material.dart';
import 'package:wechat_app/main.dart';

// AppBar配置
class CloseBar extends AppBar {
  CloseBar({Key? key})
      : super(
          elevation: 0.0,
          // leading有个大小约束，要取消约束，可使用UnconstrainedBox()
          leading: InkWell(
            child: const Icon(
              Icons.close,
              color: Colors.black,
            ),
            onTap: () {
              Navigator.of(navigatorKey.currentState!.context).pop();
            },
          ),
          backgroundColor: Colors.white,
        );
}
